from apps.dao.UserDao import UserDao


class UserService:
    @staticmethod
    def list(username, offset, limit):
        users = UserDao.list(username, offset, limit)
        return users

    @staticmethod
    def count():
        return UserDao.count()

    @staticmethod
    def getUserById(id):
        return UserDao.getUserById(id)


    @staticmethod
    def add(user):
        return UserDao.add(user)

    @staticmethod
    def update(id, username, password):
        return UserDao.update(id, username, password)

    @staticmethod
    def delete(id):
        return UserDao.delete(id)
